<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
    table{
      text-align: center;
    }
    img{
      width: 100px;
    }
  </style>
</head>
<body>
<div>
<table border="1">
  <tr>
    <td>照片:</td><td><img :src="p.imgUrl"></td>
  </tr>
  <tr>
    <td>姓名:</td><td>{{p.name}}</td>
  </tr>
  <tr>
    <td>年龄:</td><td>{{p.age}}</td>
  </tr>
  <tr>
    <td>好友列表:</td>
    <td>
      <ul>
        <li v-for="name in p.friends">{{name}}</li>
      </ul>
    </td>
  </tr>
</table>
  <input type="button" value="加载数据" @click="f()">
</div>
<script src="js/vue.min.js"></script>
<script>
  let v = new Vue({
    el:"body>div",
    data:{
      p:{}
    },
    methods:{
      f() {
        v.p = {name: "传奇哥", age: 18, imgUrl: "chuanqi.jpg", friends: ["貂蝉", "西施", "武则天"]}
      }
    }
  })

</script>
</body>
</html>